package org.finmanager.budget;

import javax.swing.*;

import java.awt.event.ActionListener;

/**
 * Created by Kelvin on 5/4/2014.
 */

//In the planning function
//When the user is reading the table, he may right click the mouse
//then a pop up menu will be shown and he may choose to delete a budget 
public class BudgetPopupMenu extends JPopupMenu {
	private JMenuItem deleteMenuItem;

	public BudgetPopupMenu() {
		super();

		deleteMenuItem = new JMenuItem("Delete");
		deleteMenuItem.setActionCommand(BudgetManagerController.DELETE_BUDGET);

		add(deleteMenuItem);
	}

	public void addMenuItemListener(ActionListener listener) {
		deleteMenuItem.addActionListener(listener);
	}
}
